﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;

namespace Nxg.Blog.Core {
    public class BlogContextFactory : IDesignTimeDbContextFactory<DataContext> {
        public DataContext CreateDbContext (string[] args) {
            var optionsBuilder = new DbContextOptionsBuilder<DataContext> ();
            optionsBuilder.UseSqlite ("Data Source=blog.db");

            return new DataContext (optionsBuilder.Options);
        }
    }
}